{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "e:\\OnlineClass\\AIM\\Car-Insurance-Analytics-and-Modeling\\.venv\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n",
      "e:\\OnlineClass\\AIM\\Car-Insurance-Analytics-and-Modeling\\script\\statistical_modeling.py:60: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.\n",
      "  self.data = self.data.applymap(lambda x: 0 if np.abs(x) > 1e10 else x)\n",
      "LinearExplainer explainer: 296781it [00:17, 961.53it/s]                              \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error analyzing feature importance: loop of ufunc does not support argument 0 of type float which has no callable rint method\n",
      "Model: Linear Regression\n",
      "MSE: 10838.071180733878\n",
      "MAE: 50.068630992256864\n",
      "R2: 0.558380970572235\n",
      "------------------------------\n",
      "Model: Random Forest\n",
      "MSE: 2768.3742840602577\n",
      "MAE: 11.398614939958142\n",
      "R2: 0.8871970165140869\n",
      "------------------------------\n",
      "Model: XGBoost\n",
      "MSE: 6715.20015141135\n",
      "MAE: 35.888767269769964\n",
      "R2: 0.7263756508121906\n",
      "------------------------------\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAqoAAAMMCAYAAACbt4UtAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlHJYcgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAJVVJREFUeJzt3X9s1fW9+PEXVHqqGVSES/lx65juOrep4EB6qzPGm9410bDLHzfj6gJc4o/rxjWO5t4J/qBzbpTr1JBMHJHpdX/MC5tRswyC1/WOLM7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KQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJCSUAUAICWhCgBASkIVAICUhCoAACkJVQAAUhKqAACkJFQBAEhJqAIAkJJQBQAgJaEKAEBKQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJCSUAUAICWhCgBASkIVAICUhCoAACkJVQAAUhKqAACkJFQBAEhJqAIAkJJQBQAgJaEKAEBKQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJCSUAUAICWhCgBASkIVAICUhCoAACkJVQAAUhKqAACkJFQBAEhJqAIAkJJQBQAgJaEKAEBKQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJCSUAUAICWhCgBASkIVAICUhCoAACkJVQAAUhKqAACkJFQBAEhJqAIAkJJQBQAgJaEKAEBKQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJDSsEJ13bp1MXPmzKiqqoq6urrYvn37+85fu3ZtfOITn4gzzzwzamtrY/ny5fH73/9+WBsGAOD0UHaobtq0KZqamqK5uTl27twZs2bNisbGxnjzzTeHnP/EE0/EihUrorm5OV5++eV49NFHY9OmTXHHHXd84M0DAHDqKjtUH3zwwbjpppti6dKl8alPfSrWr18fZ511Vjz22GNDzn/hhRfiiiuuiOuvvz5mzpwZn/vc5+K66677k3dhAQA4vZUVqr29vbFjx45oaGj44xOMHRsNDQ3R1tY25JrLL788duzYMRCme/bsiS1btsQ111xzzOscPnw4enp6Bj0AADi9nFHO5K6urujr64uamppB4zU1NbF79+4h11x//fXR1dUVn/3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9u3bz+udRs3bowxY8bEggULhnNZAABOI2WH6qZNm6KpqSmam5tj586dMWvWrGhsbIw333zzfde9/vrr8U//9E9x5ZVXDnuzAACcPsoO1QcffDBuuummWLp0aXzqU5+K9evXx1lnnRWPPfbYMdf09fXFF7/4xbjnnnvivPPO+0AbBgDg9FBWqPb29saOHTuioaHhj08wdmw0NDREW1vbMdd9/etfjylTpsQNN9xwXNc5fPhw9PT0DHoAAHB6KStUu7q6oq+vL2pqagaN19TUREdHx5Brnn/++Xj00Udjw4YNx32dlpaWqK6uHnjU1taWs00AAE4BJ/Rd/wcPHoxFixbFhg0bYvLkyce9buXKldHd3T3w2L9//wncJQAAGZ1RzuTJkydHRUVFdHZ2Dhrv7OyMqVOnHjX/V7/6Vbz++usxf/78gbH+/v4/XPiMM+KVV16J888//6h1pVIpSqVSOVsDAOAUU9Yd1crKypgzZ060trYOjPX390dra2vU19cfNf/CCy+MF198Mdrb2wcen//85+Pqq6+O9vZ2P9IHAOCYyrqjGhHR1NQUS5Ysiblz58a8efNi7dq1cejQoVi6dGlERCxevDhmzJgRLS0tUVVVFRdddNGg9WeffXZExFHjAADw/ys7VBcuXBgHDhyIVatWRUdHR8yePTu2bt068Aarffv2xdix/sIrAAA+mDFFURQnexN/Sk9PT1RXV0dXV1dMmjTpZG8HAID3eLfXuru7Y8KECSPynG59AgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJCSUAUAICWhCgBASkIVAICUhCoAACkJVQAAUhKqAACkJFQBAEhJqAIAkJJQBQAgJaEKAEBKQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqgAApCRUAQBISagCAJCSUAUAICWhCgBASkIVAICUhCoAACkJVQAAUhKqAACkJFQBAEhJqAIAkJJQBQAgJaEKAEBKQhUAgJSEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFISqg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PP/98PProo9He3j4KO2QkDee89+zZE//xH/8RX/ziF2PLli3x2muvxZe//OV45513orm5eTS2zTAN57yvv/766Orqis9+9rNRFEUcOXIkbrnllrjjjjtGY8uMomO1Wk9PT/zud7+LM88887ie56TfUYVyrFmzJjZu3BhPP/10VFVVneztMMIOHjwYixYtig0bNsTkyZNP9nYYBf39/TFlypR45JFHYs6cObFw4cK48847Y/369Sd7a5wA27Zti9WrV8fDDz8cO3fujKeeeio2b94c995778neGkmd9DuqkydPjoqKiujs7Bw03tnZGVOnTh1yzdSpU8uaTx7DOe933X///bFmzZr4yU9+EpdccsmJ3CYjpNzz/tWvfhWvv/56zJ8/f2Csv78/IiLOOOOMeOWVV+L8888/sZtm2Ibz/T1t2rQYN25cVFRUDIx98pOfjI6Ojujt7Y3KysoTumeGbzjnfffdd8eiRYvixhtvjIiIiy++OA4dOhQ333xz3HnnnTF2rPtnp4pjtdqECROO+25qRII7qpWVlTFnzpxobW0dGOvv74/W1taor68fck19ff2g+RERzz333DHnk8dwzjsi4r777ot77703tm7dGnPnzh2NrTICyj3vCy+8MF588cVob28feHz+85+Pq6++Otrb26O2tnY0t0+ZhvP9fcUVV8Rrr7028AeSiIhXX301pk2bJlKTG855v/3220fF6Lt/SPnDe3Q4VYxYq5X3Pq8TY+PGjUWpVCoef/zx4qWXXipuvvnm4uyzzy46OjqKoiiKRYsWFStWrBiY//Of/7w444wzivvvv794+eWXi+bmZh9P9SFS7nmvWbOmqKysLJ588sniN7/5zcDj4MGDJ+slUIZyz/u9vOv/w6Xc8963b18xfvz44h//8R+LV155pfjxj39cTJkypfjGN75xsl4CZSj3vJubm4vx48cX//Zv/1bs2bOn+Pd///fi/PPPL77whS+crJfAcTp48GCxa9euYteuXUVEFA8++GCxa9eu4te//nVRFEWxYsWKYtGiRQPz3/14qn/+538uXn755WLdunUf3o+nKoqi+Pa3v12ce+65RWVlZTFv3rziP//zPwf+2VVXXVUsWbJk0Pwf/OAHxQUXXFBUVlYWn/70p4vNmzeP8o75IMo5749+9KNFRBz1aG5uHv2NMyzlfn///4Tqh0+55/3CCy8UdXV1RalUKs4777zim9/8ZnHkyJFR3jXDVc55v/POO8XXvva14vzzzy+qqqqK2tra4stf/nLxv//7v6O/ccry05/+dMj/F797vkuWLCmuuuqqo9bMnj27qKysLM4777ziX//1X8u+7piicK8dAIB8TvrvqAIAwFCEKgAAKQlVAABSEqoAAKQkVAEASEmoAgCQklAFACAloQoAQEpCFQCAlIQqAAApCVUAAFL6fyfMafprtllmAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 800x950 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import sys\n",
    "import os\n",
    "import pandas as pd\n",
    "sys.path.append(os.path.abspath('../script'))\n",
    "from statistical_modeling import StatisticalModeling\n",
    "\n",
    "# Load the cleaned data\n",
    "cleaned_data_path = '../src/data/cleaned_data.csv'\n",
    "data = pd.read_csv(cleaned_data_path, low_memory=False)\n",
    "\n",
    "# Initialize the StatisticalModeling class\n",
    "model = StatisticalModeling(data)\n",
    "\n",
    "# Prepare the data\n",
    "model.prepare_data()\n",
    "\n",
    "# Build the models\n",
    "model.build_models()\n",
    "\n",
    "# Evaluate the models\n",
    "model.evaluate_models()\n",
    "\n",
    "# Analyze feature importance\n",
    "model.feature_importance()\n",
    "\n",
    "# Report the results\n",
    "model.report_results()\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
